Install FreeRADIUS
Copy the FreeRADIUS package to your local Linux system. The package should consists of the following components:
-
FreeRADIUS package
-
FreeRADIUSv3.sh (Agent Deployment Shell Script)
-
Client_Updater.sh (Manual RADIUS Client Updater Script)
-
Startup.sh (Startup Shell Script)
-
-
Image tar File
-
FreeRADIUS Image: Load the image into your local system using the following command:
docker load –i <image name>.tar
Note
Ensure that all the scripts are in executable mode for the user running the shell scripts. To confirm, execute the following command:
chmod +x ./<name of shell script>
-
Install the Solution
Execute the FreeRADIUSv3.sh
shell script from the package by running the command where the shell script is present: ./FreeRADIUSv3.sh
Note
To upgrade, execute the FreeRADIUSv3.sh
shell script. The script will handle all upgrade scenarios, automatically.
The following steps detail the flow for component check, and prompt for inputs as necessary before completing the agent installation:
-
The first component, the script checks for, is if the Docker is installed. If the Docker is present, the following message is displayed:
If the Docker is not installed, follow the steps to install Docker.
-
The script then checks if any of the following two FreeRADIUS components are present:
-
FreeRADIUS Agent
-
FreeRADIUS Updater
It also checks, if there is a FreeRADIUS container already present. If all three components are present, visit the Upgrade section.
Note
The above steps check for prerequisites. The following steps confirm details from the user, and help in the agent’s installation.
Press ENTER to continue.
-
-
If the default protocol for creating a container (by using the HTTP protocol) needs to be changed, type Y and press ENTER. If no change is required, type N and press ENTER.
Note
The default protocol must be changed for SafeNet Trusted Access (STA), since STA only supports HTTPS protocol.
-
Enter SafeNet Server IP or FQDN, and press ENTER.
-
Please provide the input as mentioned below.
-
For SAS PCE/SPE, please enter primary FQDN or Server IP.
-
For SafeNet Trusted Access (STA), please enter primary FQDN. Server IP is not permitted.
-
-
For STA, enter the FQDN of PrimaryAgent depending on your service zone. To locate the details, navigate to your STA Token Management console > COMMS > Auth Nodes.
The script validates if the SafeNet server Token Validator is accessible.
Note
While providing the FQDN or hostname, ensure that the FQDN or hostname is accessible from RADIUS server machine. The hostname entry of the SafeNet server is provided under /etc/hosts file.
The user input needs to be in lowercase letters.
-
-
Check if the RADIUS Client API is accessible or not. The RADIUS Client API is responsible for updating RADIUS Client configurations from the SafeNet server to the FreeRADIUS server. This is applicable to SAS PCE/SPE only.
-
For SAS PCE/SPE, the RADIUS Client API is accessible. Press Y and press ENTER.
-
The script validates if the RADIUS Client API is accessible.
-
Enter the complete path, including the file name, of the JWT key file. The JWT authentication token file can be downloaded from the SafeNet server. To download the key from the SafeNet server, follow the steps at the Download JWT Key File section.
The script validates if the JWT key file is available at the given path, and displays an appropriate message. The file is copied at the following location:
/usr/local/FreeRADIUS/Files/jwtAuthToken.key
The copied file is mounted on FreeRADIUS Container.
-
-
For STA Cloud, the RADIUS Client API is not accessible. Press N and press ENTER.
-
-
Enter the complete path, including the file name, of the Agent BSID key file.
The key file can be downloaded from the SafeNet server, and is used to encrypt/decrypt the authentication string with the server. To download the key from the SafeNet server, follow the steps explained under Downloading BSID Key File section.
The script validates if the Agent BSID key file is available at the given path, and displays an appropriate message. The file is copied at the following location:
usr/local/FreeRADIUS/Files/Agent.bsidkey
The copied file is used to mount onto the FreeRADIUS Container.
-
If you wish to use FreeRADIUS Agent support for on-prem password validation, enable concatenated credentials whereby an LDAP Password and an OTP is sent in a single password field. To use credential concatenation, enter Y as input and go to step 7.a.
Please ensure that you type N if you want to use the default behavior, where only OTP validation works and move to point 8.
-
To configure the Agent with credential concatenation, please ensure to Type Y at step 7, and provide the LDAP details as mentioned below. After completing these inputs, go to point 8 to continue configuration.
-
Enter the LDAP Server IP or Hostname.
-
Enter the LDAP port which is configured with your LDAP Server.
-
Enter the LDAP service account Details.
-
Enter the LDAP service account Password.
-
Enter the Base DN of your LDAP Server.
-
Enter the delimiter to split the password for authentication.
Note
Make sure the LDAP Server details are entered correctly. The FreeRADIUS container may crash if the details provided are not correct.
With complex LDAP password and OTP it is recommended to use string as a delimiter to avoid issues with user passwords having the same character in delimiter
-
-
-
To determine FreeRADIUS agent response in case of the authentication service being unavailable, Please provide Y as input to fail silently, else go with N as your input (returns access-reject).
For Input as N
Note
By default the FreeRADIUS agent would respond as an Access-Reject in case the SafeNet server is not reachable, if Y is provided as an input then the RADIUS Client would respond as No response from the server this will help to control failover.
-
This step is Optional. For PEAP support with a strong EAP type, such as TLS with certificates, both the client and the server use certificates to verify their identities to each other. Certificates must meet specific requirements, both on the server and on the client machine for successful authentication.
By default, the FreeRADIUS image contains these certificates at the following path:
/opt/gemalto/certs
-
For using default certificates, press Y and press ENTER.
-
For using proprietary/own certificates, press N and press ENTER.
-
Certificate Authority Certificate is the first required certificate. Enter the path of the certificate.
The script will validate if the certificate is present at the provided path. The Certificate Authority Certificate will then be copied to the following location, usr/local/FreeRADIUS/Certs and renamed as ca.pem.
-
Key Certificate is the second required certificate. Enter the path of the certificate.
-
The script will validate if the certificate is present at the provided path. The Key Certificate will then be copied to the following location: usr/local/FreeRADIUS/Certs and renamed as ca.pem.
-
The script will then prompt the user to enter passphrase if the Key Certificate is passphrase protected. If the certificate is not passphrase protected, press ENTER to continue.
-
-
Client Certificate is the third required certificate. Enter the path of the certificate.
The script will validate if the certificate is present at the provided path. The Client Certificate will then be copied to the following location, usr/local/FreeRADIUS/Certs and renamed as server.pem.
-
-
-
Enter external port number of the FreeRADIUS container.
The script validates if the port is accessible or not, and displays an appropriate message. If the port is not accessible, the script does not exit.
-
Select whether you want to use the default Encoding Format iso8859 or utf8. This configuration option will determine how to interpret username/password. By default the agent supports iso-8859-1 encoding which means that there is no support for non-European languages.
-
To select the default option of iso8859. Type N, and press ENTER.
-
To change the option to utf8. Type Y, and press ENTER.
-
-
Select whether you want to use SYSLOG or a JSON-FILE as the default log driver for the FreeRADIUS container. By default, the script will deploy SYSLOG as the default log driver.
-
To select SYSLOG as the default log driver: Type N and press ENTER.
-
To select local host as SYSLOG Server: Type N, and press ENTER.
-
To select external host as a SYSLOG Server: Type Y, and press ENTER.
Note
- Enter SYSLOG Server address in the following format:
<Protocol>://<SYSLOG_Server_IP>:<Port>
For example,udp://127.0.0.1:514 udp://10.164.45.44:514
- SYSLOG log drivers are saved under: /var/log/messages
- The FreeRADIUS Container logs can be distinguished from system logs. The former will have the FreeRADIUS tag before them.
- Enter SYSLOG Server address in the following format:
-
-
To select a JSON-FILE as the default log driver: Type Y, and press ENTER. Configure the JSON file as below:
-
To set JSON-FILE as the log driver and create the FreeRADIUS container, the container values need to be set. If you type N (and press ENTER), the script, by default, creates a container with max-size=50m and maxfile=5 values. If you want to change these values, type Y, and press ENTER.
-
The script will prompt for the values required for max-size and maxfile fields, and creates the container with the supplied values.
Note
-
max-size field: Maximum log size before it is rolled.
-
Accepted Values: Positive integer followed by the unit of measure
(k for kilobytes, m for megabytes or g for gigabytes). -
maxfile field: Maximum number of log files that can exist in a container. This field is effective only when the max-size field is set. If rolling the logs create excess files, the oldest file is removed.
Accepted Values: Positive integer.
The Json file logs can be located by executing the following command:
docker logs –f FreeRADIUSv3
-
-
-
Using the given values, the script creates a FreeRADIUS container.
-
The script validates if the container starts, using the provided inputs.
-
The FreeRADIUS container is ready to use.
- In case of fresh installations, no uninstallations are required. In case of upgrades, old installations need to be uninstalled
- To ensure uninterrupted access to the FreeRADIUS Container (after installation), execute the Startup Script.
- In case of fresh installations, no uninstallations are required. In case of upgrades, old installations need to be uninstalled
Test Authentication
The passcode required for Authentication will be LDAP password followed by OTP code (split by delimiter). For example, if you are using NTRadping, then the password will be concatenation of LDAP password followed by delimiter followed by OTP code.
JSON and SYSLOG Drivers
JSON Logging Driver
JSON logging driver allows to capture the standard output (and standard error) in JSON format, in files which annotate each line with its origin (stdout
or stderr
) and timestamp.
SYSLOG Logging Driver
SYSLOG logging driver allows you to route logs to a SYSLOG server. The SYSLOG message must be formatted in a specific way, to enable valid extraction of the information.